﻿@model AgileZen.Models.Roles

@{
    ViewBag.Title = "Roles";
}

<h2>Index</h2>

@Html.ActionLink("Add", "Add", "Role", new { projectId = Int32.Parse(Request.QueryString["projectid"]) }, null)

<table>
    <tr>
        <td></td>
        <td>Name</td>
        <td></td>
    </tr>
@foreach (var role in Model.Items)
{ 
    <tr>
        <td>@Html.ActionLink("Edit", "Edit", "Role", new { id = role.Id, projectId = Int32.Parse(Request.QueryString["projectid"]) }, null)</td>
        <td>@Html.ActionLink(role.Name, "Details", "Role", new { id = role.Id, projectId = Int32.Parse(Request.QueryString["projectid"]) }, null)</td>
        <td>@Html.ActionLink("Members", "Members", "Role", new { id = role.Id, projectId = Int32.Parse(Request.QueryString["projectid"]) }, null)</td>
        <td>@Html.ActionLink("Add Me", "AddMe", "Role", new { id = role.Id, projectId = Int32.Parse(Request.QueryString["projectid"]) }, null)</td>
        <td>@Html.ActionLink("Delete", "Delete", "Role", new { id = role.Id, projectId = Int32.Parse(Request.QueryString["projectid"]) }, null)</td>
    </tr>
}
</table>

